<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@  taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="Css/bootstrap.css" />
<link rel="stylesheet" type="text/css"
	href="Css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="Css/style.css" />
<script type="text/javascript" src="Js/jquery.js"></script>
<script type="text/javascript" src="Js/jquery.sorted.js"></script>
<script type="text/javascript" src="Js/bootstrap.js"></script>
<script type="text/javascript" src="Js/ckform.js"></script>
<script type="text/javascript" src="Js/common.js"></script>

<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>

<script type="text/javascript">
	$(function() {
		$('#newNav').click(function() {
			window.location.href = "getAddFile";
		});
	});

	function checkall() {
		var alls = document.getElementsByName("check");
		var ch = document.getElementById("checkall");
		if (ch.checked) {
			for (var i = 0; i < alls.length; i++) {
				alls[i].checked = true;
			}
		} else {
			for (var i = 0; i < alls.length; i++) {
				alls[i].checked = false;
			}
		}
	}
	function delAll() {
		var alls = document.getElementsByName("check");
		var ids = new Array();
		for (var i = 0; i < alls.length; i++) {
			if (alls[i].checked) {
				ids.push(alls[i].value);
			}
		}
		if (ids.length > 0) {
			if (confirm("确认删除?")) {
				alert("删除成功!");
			}
		} else {
			alert("请选中要删除的项");
		}
	}
</script>

</head>
<body>
	<form class="form-inline definewidth m20" action="index.html"
		method="get">
		角色名称： <input type="text" name="rolename" id="rolename"
			class="abc input-default" placeholder="" value="">&nbsp;&nbsp;
		<button type="submit" class="btn btn-primary">查询</button>
	</form>
	<table class="table table-bordered table-hover definewidth m10">
		<thead>
			<tr>
				<th width="5%"><input type="checkbox" id="checkall"
					onChange="checkall();"></th>
				<th>文件名</th>
				<th>上传时间</th>
				<th>上传人</th>
				<th width="10%">操作</th>
			</tr>
		</thead>

		<%-- <c:forEach var="r" items="${roles }">
	    	 <tr>
	         	<td style="vertical-align:middle;"><input type="checkbox" name="check" value="${r.roleId }"></td>
	            <td>${r.roleName }</td>
	            <td>
	            	<c:if test="${r.roleState  == 0}">
	            		启用
	            	</c:if>
	            	<c:if test="${r.roleState  != 0}">
	            		禁用
	            	</c:if>
	            </td>
	            <td><a href="getEditRole?roleId=${r.roleId }">编辑</a>&nbsp;&nbsp;&nbsp;<a href="javascript:alert('删除成功！');">删除</a> &nbsp;&nbsp;&nbsp;<a href="javascript:alert('删除成功！');">下载</a></td>
	        </tr>
    	</c:forEach> --%>

		<!-- <tr>
         	<td style="vertical-align:middle;"><input type="checkbox" name="check" value="1"></td>
            <td>管理员</td>
            <td>启用</td>
            <td>启用</td>
            <td><a href="editRole.html">编辑</a>&nbsp;&nbsp;&nbsp;<a href="javascript:alert('删除成功！');">删除</a>
            &nbsp;&nbsp;&nbsp;<a href="javascript:alert('删除成功！');">下载</a>
             </td>
        </tr> -->

		<tr>
			<td style="vertical-align: middle;"><input type="checkbox"
				name="check" value="1"></td>
			<td>JAVA入门PDF</td>
			<td>2017-10-03 10:37:08</td>
			<td>zhangsan</td>
			<td><a href="editRole.html">编辑</a>&nbsp;&nbsp;&nbsp;<a
				href="javascript:alert('删除成功！');">删除</a> &nbsp;&nbsp;&nbsp;<a
				href="javascript:alert('删除成功！');">下载</a></td>
		</tr>


		<tr>
			<td style="vertical-align: middle;"><input type="checkbox"
				name="check" value="1"></td>
			<td>JAVA入门PDF</td>
			<td>2017-10-03 10:37:08</td>
			<td>zhangsan</td>
			<td><a href="editRole.html">编辑</a>&nbsp;&nbsp;&nbsp;<a
				href="javascript:alert('删除成功！');">删除</a> &nbsp;&nbsp;&nbsp;<a
				href="javascript:alert('删除成功！');">下载</a></td>
		</tr>


		<tr>
			<td style="vertical-align: middle;"><input type="checkbox"
				name="check" value="1"></td>
			<td>JAVA入门PDF</td>
			<td>2017-10-03 10:37:08</td>
			<td>zhangsan</td>
			<td><a href="editRole.html">编辑</a>&nbsp;&nbsp;&nbsp;<a
				href="javascript:alert('删除成功！');">删除</a> &nbsp;&nbsp;&nbsp;<a
				href="javascript:alert('删除成功！');">下载</a></td>
		</tr>
	</table>


	<table class="table table-bordered table-hover definewidth m10">
		<tr>
			<th colspan="5">
				<div class="inline pull-right page">
					10122 条记录 1/507 页 <a href='#'>下一页</a> <a href='#'>最后一页</a>
				</div>
				<div>
					<button type="button" class="btn btn-success" id="newNav">上传资料</button>
					&nbsp;&nbsp;&nbsp;
					<button type="button" class="btn btn-success" id="delPro"
						onClick="delAll();">删除选中</button>
				</div>
			</th>
		</tr>
	</table>
</body>
</html>
